﻿package com.sundhage.gui {	import flash.display.*;	import flash.events.*;		public class JSAssets {		protected function bmpCopy(b:*):BitmapData {			if (b == null) {				return new BitmapData(10,10,true,0xff00ff);			}			var ret:BitmapData = BitmapData(b.clone());			return ret;		}		protected function copy(obj:*, btnMode:Boolean = false):Sprite {			//trace(obj.width);			//trace(obj.height);			if (obj.width > 0 && obj.height > 0) {				var bmpData:BitmapData = new BitmapData(obj.width, obj.height, true, 0x0);				bmpData.draw(obj);				var bmp:Bitmap = new Bitmap(bmpData);				var ret:Sprite = new Sprite();				ret.addChild(bmp);				ret.buttonMode = btnMode;				return ret;			}			//trace("ffel fe lf lfe lef");			return new Sprite();		}			}}